#ifndef MAINWINDOW_H
#define MAINWINDOW_H


#include <QMainWindow>
#include <QNetworkReply>
#include <QTableWidget>
#include "model_view/balance/profiletablemodel.h"
#include "model_view/balance/profiledelegate.h"
#include "providers/serviceprovider.h"
#include "model_view/balance/userprofile.h"


//struct AccountInfo
//{
//    int balance;
//    int bonuses;
//};

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit              MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void                  closeEvent(QCloseEvent *event);
    QTableView            *table_view;
    ProfileTableModel     *profile_model;
    ProfileDelegate       *profile_delegate;
public slots:
    void                  zeroProfiles();
    void                  updateTableView(int row);
    void                  getBalances(QObject *model);
    void                  createCreditWindow();
    void                  selectionChanged(QItemSelection selected, QItemSelection deselected);
    void                  PaySelected(QObject *view);
private:
    Ui::MainWindow       *ui;
};

#endif // MAINWINDOW_H
